package cn.lsc.feign;

import cn.lsc.domain.User;
import cn.lsc.openfegin.UserFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@RequestMapping("/user")
@FeignClient(value = "user-service" ,fallbackFactory = UserFeignClientFallbackFactory.class)
public interface UserFeignService {
    @GetMapping("/findById/{id}")
    User findById(@PathVariable("id")Long id);
}
